USE [SONALIKA_BGK_UPDATED]
GO

/****** Object:  Table [dbo].[SPARE_PARTS]    Script Date: 07-Jun-14 11:54:36 PM ******/
SET ANSI_NULLS ON
GO

SET QUOTED_IDENTIFIER ON
GO

SET ANSI_PADDING ON
GO

CREATE TABLE [dbo].[SPARE_PARTS](
	[SPARE_PART_ID] [int] IDENTITY(1,1) NOT NULL,
	[SPARE_PART_CODE] [varchar](50) NOT NULL,
	[SPARE_PART_DESCRIPTION] [varchar](100) NOT NULL,
	[SPARE_MINLEVEL] [int] NULL,
	[SPARE_BIN_NO] [varchar](50) NULL,
	[SPARE_STATUS] [int] NOT NULL,
 CONSTRAINT [PK_SPARE_PARTS] PRIMARY KEY CLUSTERED 
(
	[SPARE_PART_ID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]

GO

SET ANSI_PADDING OFF
GO

ALTER TABLE [dbo].[SPARE_PARTS]  WITH CHECK ADD  CONSTRAINT [FK_SPARE_PARTS_MASTER] FOREIGN KEY([SPARE_STATUS])
REFERENCES [dbo].[MASTER] ([MASTER_ID])
GO

ALTER TABLE [dbo].[SPARE_PARTS] CHECK CONSTRAINT [FK_SPARE_PARTS_MASTER]
GO

